Skip to content

chore: update generated code marker to class_generator path#2750

Merged
rnetser merged 2 commits into
mainfrom
chore/update-generated-code-marker
Jun 29, 2026
Merged

chore: update generated code marker to class_generator path#2750
rnetser merged 2 commits into
mainfrom
chore/update-generated-code-marker

Conversation

@myakove

@myakove myakove commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Updates the generated code comment marker in all 132 ocp_resources/ files from the old path (scripts/resource/README.md) to the current class-generator path (class_generator/README.md).

Why

The .coderabbit.yaml skip instruction references the new marker (class_generator/README.md), but all existing generated files still used the old marker (scripts/resource/README.md). This meant CodeRabbit was not skipping generated code sections during reviews.

Changes

  • 132 files in ocp_resources/: replaced scripts/resource/README.mdclass_generator/README.md in the generated code start marker comment.
  • No functional code changes.

Summary by CodeRabbit

  • Chores
    • Updated generated-file header comments across many resource modules to point to the current generator documentation path.
    • Standardized source references in file headers for consistency.
    • No runtime behavior, public APIs, or user-facing functionality changed.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 158 files, which is 8 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 087f8f40-181c-41ea-9a8e-92102a271103

📥 Commits

Reviewing files that changed from the base of the PR and between 99bc065 and c1ced2f.

📒 Files selected for processing (158)
  • class_generator/core/generator.py
  • class_generator/tests/manifests/APIServer/api_server.py
  • class_generator/tests/manifests/ClusterOperator/cluster_operator.py
  • class_generator/tests/manifests/ConfigMap/config_map.py
  • class_generator/tests/manifests/DNS/dns_config_openshift_io.py
  • class_generator/tests/manifests/DNS/dns_operator_openshift_io.py
  • class_generator/tests/manifests/Deployment/deployment.py
  • class_generator/tests/manifests/ImageContentSourcePolicy/image_content_source_policy.py
  • class_generator/tests/manifests/Ingress/ingress_config_openshift_io.py
  • class_generator/tests/manifests/Ingress/ingress_networking_k8s_io.py
  • class_generator/tests/manifests/Machine/machine.py
  • class_generator/tests/manifests/NMState/nm_state.py
  • class_generator/tests/manifests/OAuth/oauth.py
  • class_generator/tests/manifests/Pipeline/pipeline.py
  • class_generator/tests/manifests/Pod/pod.py
  • class_generator/tests/manifests/RouteAdvertisements/route_advertisements.py
  • class_generator/tests/manifests/Secret/secret.py
  • class_generator/tests/manifests/ServiceMeshMember/service_mesh_member.py
  • class_generator/tests/manifests/ServingRuntime/serving_runtime.py
  • class_generator/tests/manifests/test_parse_explain.j2
  • class_generator/tests/test_batch_regeneration.py
  • class_generator/tests/test_class_generator.py
  • class_generator/tests/test_user_code_parser.py
  • class_generator/tests/test_utils.py
  • class_generator/utils.py
  • ocp_resources/aaq.py
  • ocp_resources/api_server.py
  • ocp_resources/authentication_config_openshift_io.py
  • ocp_resources/authentication_operator_openshift_io.py
  • ocp_resources/authorino.py
  • ocp_resources/bgp_session_state.py
  • ocp_resources/cdi.py
  • ocp_resources/cdi_config.py
  • ocp_resources/cluster_resource_quota.py
  • ocp_resources/cluster_user_defined_network.py
  • ocp_resources/config_imageregistry_operator_openshift_io.py
  • ocp_resources/config_map.py
  • ocp_resources/config_operator_openshift_io.py
  • ocp_resources/config_samples_operator_openshift_io.py
  • ocp_resources/console_config_openshift_io.py
  • ocp_resources/console_operator_openshift_io.py
  • ocp_resources/conversion.py
  • ocp_resources/csi_driver.py
  • ocp_resources/data_import_cron.py
  • ocp_resources/data_protection_application.py
  • ocp_resources/data_science_cluster.py
  • ocp_resources/data_science_pipelines_application.py
  • ocp_resources/deployment.py
  • ocp_resources/direct_volume_migration.py
  • ocp_resources/direct_volume_migration_progress.py
  • ocp_resources/dns_config_openshift_io.py
  • ocp_resources/dns_operator_openshift_io.py
  • ocp_resources/dsc_initialization.py
  • ocp_resources/evalhub.py
  • ocp_resources/frr_configuration.py
  • ocp_resources/gateway_class.py
  • ocp_resources/gateway_config.py
  • ocp_resources/gateway_gateway_networking_k8s_io.py
  • ocp_resources/gateway_networking_istio_io.py
  • ocp_resources/group.py
  • ocp_resources/guardrails_orchestrator.py
  • ocp_resources/image_caching_internal_knative_dev.py
  • ocp_resources/image_config_openshift_io.py
  • ocp_resources/image_content_source_policy.py
  • ocp_resources/image_image_openshift_io.py
  • ocp_resources/inference_graph.py
  • ocp_resources/ingress_config_openshift_io.py
  • ocp_resources/ingress_networking_k8s_io.py
  • ocp_resources/jaeger.py
  • ocp_resources/kube_descheduler.py
  • ocp_resources/kubelet_config.py
  • ocp_resources/kubevirt.py
  • ocp_resources/llama_stack_distribution.py
  • ocp_resources/llm_inference_service.py
  • ocp_resources/lm_eval_job.py
  • ocp_resources/maa_s_auth_policy.py
  • ocp_resources/maa_s_model.py
  • ocp_resources/maa_s_subscription.py
  • ocp_resources/maas_auth_policy.py
  • ocp_resources/maas_model_ref.py
  • ocp_resources/maas_subscription.py
  • ocp_resources/machine.py
  • ocp_resources/maria_db.py
  • ocp_resources/mariadb_operator.py
  • ocp_resources/mig_analytic.py
  • ocp_resources/mig_cluster.py
  • ocp_resources/mig_controller.py
  • ocp_resources/mig_migration.py
  • ocp_resources/mig_plan.py
  • ocp_resources/mlflow.py
  • ocp_resources/mlflow_config.py
  • ocp_resources/model_registry.py
  • ocp_resources/model_registry_components_platform_opendatahub_io.py
  • ocp_resources/model_registry_modelregistry_opendatahub_io.py
  • ocp_resources/mtq.py
  • ocp_resources/multi_namespace_virtual_machine_storage_migration.py
  • ocp_resources/multi_namespace_virtual_machine_storage_migration_plan.py
  • ocp_resources/namespace.py
  • ocp_resources/nemo_guardrails.py
  • ocp_resources/network_config_openshift_io.py
  • ocp_resources/network_operator_openshift_io.py
  • ocp_resources/network_policy.py
  • ocp_resources/nm_state.py
  • ocp_resources/node.py
  • ocp_resources/node_config_openshift_io.py
  • ocp_resources/node_network_configuration_policy_latest.py
  • ocp_resources/notebook.py
  • ocp_resources/oauth.py
  • ocp_resources/open_telemetry_collector.py
  • ocp_resources/operator.py
  • ocp_resources/pipeline.py
  • ocp_resources/pipeline_run.py
  • ocp_resources/pod.py
  • ocp_resources/pod_metrics.py
  • ocp_resources/project_config_openshift_io.py
  • ocp_resources/project_project_openshift_io.py
  • ocp_resources/project_request.py
  • ocp_resources/prometheus.py
  • ocp_resources/rate_limit_policy.py
  • ocp_resources/replica_set.py
  • ocp_resources/route_advertisements.py
  • ocp_resources/scaled_object.py
  • ocp_resources/scheduler.py
  • ocp_resources/securesign.py
  • ocp_resources/security_context_constraints.py
  • ocp_resources/self_subject_review.py
  • ocp_resources/service.py
  • ocp_resources/service_mesh_member.py
  • ocp_resources/service_serving_knative_dev.py
  • ocp_resources/serving_runtime.py
  • ocp_resources/snapshot.py
  • ocp_resources/ssp.py
  • ocp_resources/storage_cluster.py
  • ocp_resources/task.py
  • ocp_resources/task_run.py
  • ocp_resources/tempo_stack.py
  • ocp_resources/token_rate_limit_policy.py
  • ocp_resources/user.py
  • ocp_resources/user_defined_network.py
  • ocp_resources/validating_admission_policy.py
  • ocp_resources/validating_admission_policy_binding.py
  • ocp_resources/virtual_machine_cluster_instancetype.py
  • ocp_resources/virtual_machine_cluster_preference.py
  • ocp_resources/virtual_machine_export.py
  • ocp_resources/virtual_machine_instance.py
  • ocp_resources/virtual_machine_instance_migration.py
  • ocp_resources/virtual_machine_instance_preset.py
  • ocp_resources/virtual_machine_instance_replica_set.py
  • ocp_resources/virtual_machine_instancetype.py
  • ocp_resources/virtual_machine_preference.py
  • ocp_resources/virtual_machine_storage_migration.py
  • ocp_resources/virtual_machine_storage_migration_plan.py
  • ocp_resources/virtual_machine_template.py
  • ocp_resources/virtual_machine_template_request.py
  • ocp_resources/volume_snapshot.py
  • ocp_resources/volume_snapshot_class.py
  • ocp_resources/vtep.py
  • tests/scripts/validate_resources.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The top-of-file "Generated using …" comment in 120+ ocp_resources/*.py modules is updated to reference class_generator/README.md instead of scripts/resource/README.md. No runtime logic, public APIs, or behavior changed in any file.

Changes

Generator attribution comment bulk update

Layer / File(s) Summary
Generator README reference update
ocp_resources/aaq.py, ocp_resources/api_server.py, ocp_resources/authentication_*.py, ocp_resources/authorino.py, ocp_resources/bgp_session_state.py, ocp_resources/cdi*.py, ocp_resources/cluster_*.py, ocp_resources/config_*.py, ocp_resources/console_*.py, ocp_resources/conversion.py, ocp_resources/csi_driver.py, ocp_resources/data_*.py, ocp_resources/deployment.py, ocp_resources/direct_volume_migration*.py, ocp_resources/dns_*.py, ocp_resources/dsc_initialization.py, ocp_resources/evalhub.py, ocp_resources/frr_configuration.py, ocp_resources/gateway_*.py, ocp_resources/group.py, ocp_resources/guardrails_orchestrator.py, ocp_resources/image_*.py, ocp_resources/inference_graph.py, ocp_resources/ingress_*.py, ocp_resources/jaeger.py, ocp_resources/kube_descheduler.py, ocp_resources/kubelet_config.py, ocp_resources/kubevirt.py, ocp_resources/llama_stack_distribution.py, ocp_resources/llm_inference_service.py, ocp_resources/lm_eval_job.py, ocp_resources/maa_s_*.py, ocp_resources/maas_*.py, ocp_resources/machine.py, ocp_resources/maria_db.py, ocp_resources/mariadb_operator.py, ocp_resources/mig_*.py, ocp_resources/mlflow*.py, ocp_resources/model_registry*.py, ocp_resources/mtq.py, ocp_resources/multi_namespace_*.py, ocp_resources/namespace.py, ocp_resources/nemo_guardrails.py, ocp_resources/network_*.py, ocp_resources/nm_state.py, ocp_resources/node*.py, ocp_resources/notebook.py, ocp_resources/oauth.py, ocp_resources/open_telemetry_collector.py, ocp_resources/operator.py, ocp_resources/pipeline*.py, ocp_resources/pod*.py, ocp_resources/project_*.py, ocp_resources/prometheus.py, ocp_resources/rate_limit_policy.py, ocp_resources/replica_set.py, ocp_resources/route_advertisements.py, ocp_resources/scaled_object.py, ocp_resources/scheduler.py, ocp_resources/securesign.py, ocp_resources/security_context_constraints.py, ocp_resources/self_subject_review.py, ocp_resources/service*.py, ocp_resources/serving_runtime.py, ocp_resources/snapshot.py, ocp_resources/ssp.py, ocp_resources/storage_cluster.py, ocp_resources/task*.py, ocp_resources/tempo_stack.py, ocp_resources/token_rate_limit_policy.py, ocp_resources/user*.py, ocp_resources/validating_admission_policy*.py, ocp_resources/virtual_machine_*.py, ocp_resources/volume_snapshot*.py, ocp_resources/vtep.py
Line 1 of each file changes the "Generated using …" comment from scripts/resource/README.md to class_generator/README.md. No other code is modified in any file.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating generated-code markers to the class_generator path.
Description check ✅ Passed The description covers what changed, why, and the file count, though it omits some template sections like issues and reviewer notes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-generated-code-marker

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@redhat-qe-bot1

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: Disabled for this repository
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: All label categories are enabled (default configuration)

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest python-module-install - Test Python package installation
  • /retest conventional-title - Validate commit message format
  • /retest all - Run all available tests

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. Status Checks: All required status checks must pass
  3. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  4. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge
AI Features
  • Conventional Title: Mode: fix (claude/claude-opus-4-6-1m)
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Align generated-code marker with class_generator path for CodeRabbit skipping
🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

Description

• Update generated-code header marker in ocp_resources Python modules to new class_generator path.
• Align markers with .coderabbit.yaml skip instructions so generated sections are ignored in
 reviews.
• No functional/resource behavior changes; comment-only update across generated files.
Diagram

graph TD
  bot["CodeRabbit"] --> cfg[".coderabbit.yaml"] --> marker["Start marker (URL)"]
  bot --> files["ocp_resources/*.py"] --> marker
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Teach CodeRabbit to accept both old and new markers
  • ➕ Avoids touching a large number of generated files
  • ➕ Smaller diff; easier blame/history
  • ➖ Leaves stale marker in generated sources, increasing confusion
  • ➖ Prolongs divergence from the actual generator location
2. Regenerate ocp_resources via class-generator
  • ➕ Ensures all generated outputs are fully consistent with the generator
  • ➕ May catch other unintended drift in generated files
  • ➖ Likely produces a much larger/noisier diff than necessary
  • ➖ Requires reproducible generator inputs/version to avoid unrelated churn
3. Skip by path only (no marker matching)
  • ➕ No dependency on header comment strings
  • ➕ Simpler rule maintenance if all content is generated
  • ➖ Cannot support mixed generated + hand-written sections within the same file
  • ➖ Less explicit provenance in the source header

Recommendation: This PR’s approach is appropriate: updating the marker in generated files to match the configured skip rule is the most direct, low-risk fix and keeps provenance accurate. If churn becomes a concern, consider temporarily supporting both markers in .coderabbit.yaml, but the end state should remain a single canonical marker.

Files changed (132) +132 / -132

Other (132) +132 / -132
aaq.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header comment to reference class_generator/README.md instead of scripts/resource/README.md, matching CodeRabbit’s configured skip marker.

ocp_resources/aaq.py

api_server.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to the class_generator path so automated reviews can correctly detect generated sections.

ocp_resources/api_server.py

authentication_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker comment with the class_generator README location referenced by review tooling.

ocp_resources/authentication_config_openshift_io.py

authentication_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes only the generated header marker URL to the class_generator path for consistent generated-code skipping.

ocp_resources/authentication_operator_openshift_io.py

authorino.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code provenance header to the class_generator README path; no runtime logic changes.

ocp_resources/authorino.py

bgp_session_state.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Switches the generated header marker from scripts/resource to class_generator so tooling can identify generated blocks.

ocp_resources/bgp_session_state.py

cdi.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header comment URL to point to class_generator/README.md; functional code remains unchanged.

ocp_resources/cdi.py

cdi_config.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code start marker URL with the class_generator path used by CodeRabbit skip instructions.

ocp_resources/cdi_config.py

cluster_resource_quota.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header marker URL to reference class_generator/README.md to match configured review skips.

ocp_resources/cluster_resource_quota.py

cluster_user_defined_network.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to the class_generator path for tooling consistency.

ocp_resources/cluster_user_defined_network.py

config_imageregistry_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes the generated-code provenance comment to the class_generator README location; no behavioral changes.

ocp_resources/config_imageregistry_operator_openshift_io.py

config_map.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker to class_generator/README.md so CodeRabbit can skip generated sections correctly.

ocp_resources/config_map.py

config_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code header marker URL with the current class_generator tool path referenced in tooling rules.

ocp_resources/config_operator_openshift_io.py

config_samples_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the top-of-file generated marker URL to the class_generator path; no other code changes.

ocp_resources/config_samples_operator_openshift_io.py

console_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL to match review-skip configuration.

ocp_resources/console_config_openshift_io.py

console_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header comment to point at class_generator/README.md, enabling consistent generated-code detection.

ocp_resources/console_operator_openshift_io.py

conversion.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes only the generated-code header marker URL to the class_generator path used by CodeRabbit.

ocp_resources/conversion.py

csi_driver.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates generated provenance marker URL to class_generator/README.md; no functional modifications.

ocp_resources/csi_driver.py

data_import_cron.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code header marker URL with class_generator so tooling can skip generated sections reliably.

ocp_resources/data_import_cron.py

data_protection_application.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to the class_generator README location referenced by .coderabbit.yaml.

ocp_resources/data_protection_application.py

data_science_cluster.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated marker URL with the class_generator path; runtime code remains unchanged.

ocp_resources/data_science_cluster.py

data_science_pipelines_application.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md to match review tooling configuration.

ocp_resources/data_science_pipelines_application.py

deployment.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header comment URL to point to class_generator/README.md; no behavior change.

ocp_resources/deployment.py

direct_volume_migration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes the generated-code marker comment to reference the class_generator path for correct CodeRabbit skipping.

ocp_resources/direct_volume_migration.py

direct_volume_migration_progress.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL from scripts/resource to class_generator; no functional change.

ocp_resources/direct_volume_migration_progress.py

dns_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the file’s generated header marker URL with the class_generator README referenced by tooling.

ocp_resources/dns_config_openshift_io.py

dns_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated marker URL to class_generator/README.md to match CodeRabbit skip rules.

ocp_resources/dns_operator_openshift_io.py

dsc_initialization.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header comment URL to reference the current class_generator tool path.

ocp_resources/dsc_initialization.py

evalhub.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code provenance marker URL to the class_generator README location; no logic changes.

ocp_resources/evalhub.py

frr_configuration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Switches generated header marker URL to class_generator/README.md to align with review tooling expectations.

ocp_resources/frr_configuration.py

gateway_class.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md so generated-code sections are correctly recognized.

ocp_resources/gateway_class.py

gateway_config.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header comment URL with the class_generator path referenced in .coderabbit.yaml.

ocp_resources/gateway_config.py

gateway_gateway_networking_k8s_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker to the class_generator README URL; no functional modifications.

ocp_resources/gateway_gateway_networking_k8s_io.py

gateway_networking_istio_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated provenance URL with the class_generator path for consistent tooling behavior.

ocp_resources/gateway_networking_istio_io.py

group.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md, matching the configured CodeRabbit skip marker.

ocp_resources/group.py

guardrails_orchestrator.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes the top-of-file generated marker URL to reference class_generator/README.md; no runtime change.

ocp_resources/guardrails_orchestrator.py

image_caching_internal_knative_dev.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to the class_generator path for consistent generated-code skipping.

ocp_resources/image_caching_internal_knative_dev.py

image_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the file’s generated header marker URL with class_generator/README.md referenced by tooling.

ocp_resources/image_config_openshift_io.py

image_content_source_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker comment URL to class_generator/README.md; no other changes.

ocp_resources/image_content_source_policy.py

image_image_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated marker URL to reference class_generator/README.md to match CodeRabbit skip configuration.

ocp_resources/image_image_openshift_io.py

inference_graph.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated-code provenance marker URL to the current class_generator path.

ocp_resources/inference_graph.py

ingress_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator/README.md so review tooling can skip generated code blocks.

ocp_resources/ingress_config_openshift_io.py

ingress_networking_k8s_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md; no functional changes to the resource wrapper.

ocp_resources/ingress_networking_k8s_io.py

jaeger.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL from scripts/resource to class_generator for tooling alignment.

ocp_resources/jaeger.py

kube_descheduler.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Changes only the generated marker URL to class_generator/README.md to match .coderabbit.yaml marker rules.

ocp_resources/kube_descheduler.py

kubelet_config.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header comment URL to class_generator/README.md; behavior unchanged.

ocp_resources/kubelet_config.py

kubevirt.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code header marker URL with the class_generator path used by CodeRabbit skip instructions.

ocp_resources/kubevirt.py

llama_stack_distribution.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the file’s generated provenance comment to the class_generator README path for consistent skip detection.

ocp_resources/llama_stack_distribution.py

llm_inference_service.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL; no functional changes.

ocp_resources/llm_inference_service.py

lm_eval_job.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md to align with tooling configuration.

ocp_resources/lm_eval_job.py

maa_s_auth_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated-code header marker URL to the class_generator path referenced by .coderabbit.yaml.

ocp_resources/maa_s_auth_policy.py

maa_s_model.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Switches the generated provenance marker URL to class_generator/README.md; no behavioral impact.

ocp_resources/maa_s_model.py

maa_s_subscription.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md to match review skip marker configuration.

ocp_resources/maa_s_subscription.py

maas_auth_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code marker comment URL with the class_generator tool location; no functional changes.

ocp_resources/maas_auth_policy.py

maas_model_ref.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to the class_generator README path so tooling can recognize generated code sections.

ocp_resources/maas_model_ref.py

maas_subscription.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated provenance marker URL with class_generator/README.md to match CodeRabbit skip rules.

ocp_resources/maas_subscription.py

machine.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the top-of-file generated marker URL to class_generator/README.md; no behavior changes.

ocp_resources/machine.py

maria_db.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with the class_generator README reference; functional code unchanged.

ocp_resources/maria_db.py

mariadb_operator.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated marker comment URL to class_generator/README.md for consistent generated-code skipping.

ocp_resources/mariadb_operator.py

mig_analytic.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header marker URL to reference class_generator; no other changes.

ocp_resources/mig_analytic.py

mig_cluster.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated provenance marker URL to class_generator/README.md; behavior unchanged.

ocp_resources/mig_cluster.py

mig_controller.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code marker URL with class_generator to match CodeRabbit configuration.

ocp_resources/mig_controller.py

mig_migration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to class_generator/README.md; no functional differences.

ocp_resources/mig_migration.py

mig_plan.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL for tooling alignment.

ocp_resources/mig_plan.py

mlflow.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header comment URL to class_generator/README.md so generated sections can be skipped in reviews.

ocp_resources/mlflow.py

mlflow_config.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator to match CodeRabbit skip instructions.

ocp_resources/mlflow_config.py

model_registry.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated provenance header marker URL to class_generator/README.md; no functional change in the module.

ocp_resources/model_registry.py

model_registry_components_platform_opendatahub_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header marker URL with the class_generator path to match tooling configuration.

ocp_resources/model_registry_components_platform_opendatahub_io.py

model_registry_modelregistry_opendatahub_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to class_generator/README.md to ensure generated code is properly detected.

ocp_resources/model_registry_modelregistry_opendatahub_io.py

mtq.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the top-of-file generated marker URL with class_generator/README.md for correct review skipping behavior.

ocp_resources/mtq.py

multi_namespace_virtual_machine_storage_migration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md; no logic changes.

ocp_resources/multi_namespace_virtual_machine_storage_migration.py

multi_namespace_virtual_machine_storage_migration_plan.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL to match CodeRabbit skip marker.

ocp_resources/multi_namespace_virtual_machine_storage_migration_plan.py

namespace.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated provenance header marker URL to class_generator/README.md; module behavior unchanged.

ocp_resources/namespace.py

nemo_guardrails.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator/README.md to match configured review skips.

ocp_resources/nemo_guardrails.py

network_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header comment URL to the class_generator path; no functional modifications.

ocp_resources/network_config_openshift_io.py

network_operator_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated marker URL to reference class_generator/README.md so tooling can skip generated code sections.

ocp_resources/network_operator_openshift_io.py

network_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated provenance header marker URL to class_generator; no behavior change.

ocp_resources/network_policy.py

nm_state.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with the class_generator path referenced by CodeRabbit skip rules.

ocp_resources/nm_state.py

node.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md for consistent generated-code skipping in reviews.

ocp_resources/node.py

node_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Switches the generated-code header marker URL to class_generator/README.md; no functional changes.

ocp_resources/node_config_openshift_io.py

node_network_configuration_policy_latest.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated marker comment URL to class_generator/README.md so review tooling matches the start marker correctly.

ocp_resources/node_network_configuration_policy_latest.py

notebook.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md; no functional changes in the wrapper.

ocp_resources/notebook.py

oauth.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code provenance marker URL with class_generator to match .coderabbit.yaml skip rules.

ocp_resources/oauth.py

open_telemetry_collector.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to class_generator/README.md so generated sections are recognized by tooling.

ocp_resources/open_telemetry_collector.py

operator.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated marker URL with the class_generator path for consistent provenance and review skipping.

ocp_resources/operator.py

pipeline.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md; no behavior changes.

ocp_resources/pipeline.py

pipeline_run.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator to match CodeRabbit skip marker configuration.

ocp_resources/pipeline_run.py

pod.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated provenance header marker URL to class_generator/README.md; no functional changes to Pod wrapper logic.

ocp_resources/pod.py

pod_metrics.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL so tooling correctly detects generated sections.

ocp_resources/pod_metrics.py

project_config_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header comment URL to class_generator/README.md; behavior unchanged.

ocp_resources/project_config_openshift_io.py

project_project_openshift_io.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with the class_generator tool path referenced in .coderabbit.yaml.

ocp_resources/project_project_openshift_io.py

project_request.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated-code provenance header marker URL to class_generator/README.md; no functional changes.

ocp_resources/project_request.py

prometheus.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header marker URL to reference class_generator/README.md for consistent CodeRabbit skipping.

ocp_resources/prometheus.py

rate_limit_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md; functional behavior unchanged.

ocp_resources/rate_limit_policy.py

replica_set.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated provenance marker URL with class_generator to match tooling rules for skipping generated code.

ocp_resources/replica_set.py

route_advertisements.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL from scripts/resource to class_generator; no logic changes.

ocp_resources/route_advertisements.py

scaled_object.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated marker URL to class_generator/README.md so automated reviews skip generated sections as intended.

ocp_resources/scaled_object.py

scheduler.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL; no functional impact.

ocp_resources/scheduler.py

securesign.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md to align with CodeRabbit configuration.

ocp_resources/securesign.py

security_context_constraints.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated provenance header marker URL with the class_generator path referenced by tooling.

ocp_resources/security_context_constraints.py

self_subject_review.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md; behavior remains unchanged.

ocp_resources/self_subject_review.py

service.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated marker URL to reference class_generator/README.md so generated code blocks can be skipped during reviews.

ocp_resources/service.py

service_mesh_member.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to match class_generator/README.md referenced by .coderabbit.yaml.

ocp_resources/service_mesh_member.py

service_serving_knative_dev.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated provenance marker URL with class_generator so CodeRabbit can correctly skip generated code sections.

ocp_resources/service_serving_knative_dev.py

serving_runtime.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md; no functional changes.

ocp_resources/serving_runtime.py

snapshot.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Switches the generated header marker URL to class_generator/README.md to match tooling skip rules.

ocp_resources/snapshot.py

ssp.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated-code provenance header marker URL to class_generator; module behavior unchanged.

ocp_resources/ssp.py

storage_cluster.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL for consistent generated-code detection in reviews.

ocp_resources/storage_cluster.py

task.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md, aligning with configured review skips.

ocp_resources/task.py

task_run.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with the class_generator README reference used by tooling.

ocp_resources/task_run.py

tempo_stack.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated marker URL to class_generator/README.md so CodeRabbit matches the correct start marker.

ocp_resources/tempo_stack.py

token_rate_limit_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated provenance header marker URL with class_generator/README.md; no functional changes.

ocp_resources/token_rate_limit_policy.py

user.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code header marker URL to class_generator/README.md to match CodeRabbit skip configuration.

ocp_resources/user.py

user_defined_network.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator/README.md referenced in .coderabbit.yaml so generated sections are skipped during review.

ocp_resources/user_defined_network.py

validating_admission_policy.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated provenance header marker URL to class_generator/README.md; no behavioral changes.

ocp_resources/validating_admission_policy.py

validating_admission_policy_binding.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL so tooling can recognize generated-code boundaries.

ocp_resources/validating_admission_policy_binding.py

virtual_machine_cluster_instancetype.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated header marker URL to class_generator/README.md; no functional changes to resource wrapper logic.

ocp_resources/virtual_machine_cluster_instancetype.py

virtual_machine_cluster_preference.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated provenance header marker URL with class_generator/README.md referenced by tooling.

ocp_resources/virtual_machine_cluster_preference.py

virtual_machine_export.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to class_generator/README.md; behavior unchanged.

ocp_resources/virtual_machine_export.py

virtual_machine_instance.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces the generated header marker URL to reference class_generator/README.md so CodeRabbit skips generated sections correctly.

ocp_resources/virtual_machine_instance.py

virtual_machine_instance_migration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated header marker URL with class_generator/README.md referenced by .coderabbit.yaml skip instructions.

ocp_resources/virtual_machine_instance_migration.py

virtual_machine_instance_preset.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated-code provenance header marker URL to class_generator/README.md; no functional changes.

ocp_resources/virtual_machine_instance_preset.py

virtual_machine_instance_replica_set.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates only the generated header marker URL to class_generator/README.md so tooling can detect generated code sections.

ocp_resources/virtual_machine_instance_replica_set.py

virtual_machine_instancetype.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Replaces scripts/resource marker URL with class_generator marker URL; functional behavior unchanged.

ocp_resources/virtual_machine_instancetype.py

virtual_machine_preference.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Updates the generated marker comment URL to class_generator/README.md to match CodeRabbit skip marker configuration.

ocp_resources/virtual_machine_preference.py

virtual_machine_storage_migration.pyUpdate generated-code marker URL +1/-1

Update generated-code marker URL

• Aligns the generated-code header marker URL with class_generator/README.md so review tooling recognizes generated blocks.

ocp_resources/virtual_machine_storage_migration.py

virtual_machine_storage_migration_plan.pyUpdate generated-code marker URL <...

@myakove

myakove commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

/verified

@qodo-code-review

qodo-code-review Bot commented Jun 29, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Generated scan marker mismatch ✓ Resolved 🐞 Bug ≡ Correctness
Description
After this PR changes ocp_resources/* to the new class_generator/README.md generated-header
marker, both class_generator.utils.ResourceScanner and
class_generator.core.generator.generate_resource_file_from_dict() still use the old
scripts/resource/README.md marker, so generated files are no longer discovered and any
regeneration will revert headers back to the old value. This breaks discover_generated_resources()
and makes class-generator --regenerate-all effectively a no-op (logging “Found 0 generated
resources”) while also creating inconsistent generated headers across the repo and reintroducing the
original skip/match issue for generated sections.
Code

ocp_resources/aaq.py[1]

+# Generated using https://github.com/RedHatQE/openshift-python-wrapper/blob/main/class_generator/README.md
Relevance

⭐⭐⭐ High

Repo moved to class_generator marker; PR2611 rejected reverting. So scanner/generator should align
with new marker.

PR-#2611
PR-#2477
PR-#2505

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The PR updates ocp_resources/* to start with the new .../class_generator/README.md header and
the repo is described as expecting this new marker (e.g., via .coderabbit.yaml and updated
generated files), but ResourceScanner still treats a file as generated only if it contains the old
.../scripts/resource/README.md string, so discover_generated_resources() (and therefore
class-generator --regenerate-all) won’t find any generated resources. At the same time,
generate_resource_file_from_dict() is said to still emit the old scripts/resource/README.md
header, meaning any regeneration would overwrite the newly-updated headers and bring back the old
marker, causing inconsistent headers and undoing the PR’s intended marker change.

ocp_resources/aaq.py[1-1]
.coderabbit.yaml[20-25]
class_generator/utils.py[265-276]
class_generator/cli.py[223-241]
class_generator/core/generator.py[51-58]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Unify the generated-header marker across the project: after the PR updated generated files in `ocp_resources/*` to use the `class_generator/README.md` URL, the codebase still has two critical places using the legacy `scripts/resource/README.md` marker—generated-file detection (`class_generator.utils.ResourceScanner`) and generated-file emission (`class_generator.core.generator.generate_resource_file_from_dict()`).

Fix this so that discovery/regeneration flows (including `discover_generated_resources()` and `class-generator --regenerate-all`) correctly detect generated resources after the PR, and so regenerating resources does not revert headers back to the old marker.

## Issue Context
- `ocp_resources/*` now starts with `# Generated using .../class_generator/README.md`.
- `ResourceScanner` still checks for `.../scripts/resource/README.md` and returns `None` if not found, so scans find nothing.
- `class-generator --regenerate-all` uses `discover_generated_resources()`, which relies on `ResourceScanner`, making it effectively a no-op (it logs “Found 0 generated resources”).
- The generator still hardcodes the old `scripts/resource/README.md` header when writing files, so regeneration would overwrite the new header and reintroduce inconsistent markers as well as the original “generated sections” match/skip problem.
- To keep generated output stable, the marker should be defined once (constant) and reused by generator output, generated-file detection logic, and any validation/tests that assert on the marker.

## Fix Focus Areas
- class_generator/utils.py[265-276]
- class_generator/constants.py[37-40]
- class_generator/tests/test_utils.py[84-110]
- class_generator/core/generator.py[51-60]
- class_generator/tests/manifests/APIServer/api_server.py[1-1]
- class_generator/tests/test_user_code_parser.py[14-22]
- class_generator/tests/test_batch_regeneration.py[29-36]
- tests/scripts/validate_resources.py[118-126]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread ocp_resources/aaq.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ocp_resources/authorino.py`:
- Line 1: The generated-resource marker in the authorino file has changed, so
downstream consumers still checking the old marker will stop recognizing
generated resources. Update the marker handling in validate_resources.py and
class_generator/utils.py to match the new “Generated using
https://github.com/RedHatQE/openshift-python-wrapper/blob/main/class_generator/README.md”
string, or centralize the marker into a shared constant/config used by both
places. Focus on the marker-matching logic in the resource validation and class
generation paths so they stay consistent.

In `@ocp_resources/cluster_user_defined_network.py`:
- Line 1: The generated-marker URL is still inconsistent across the toolchain,
so update the hardcoded reference used by the generator and validation flow to
the new class_generator README location. Adjust the logic in
class_generator/core/generator.py, class_generator/utils.py, and
tests/scripts/validate_resources.py so they all point to
class_generator/README.md, keeping the marker check and regeneration path
aligned.

In `@ocp_resources/deployment.py`:
- Line 1: Update the generated-file marker consistently across the generator and
validator: the header emitted by class_generator/core/generator.py’s generation
path and the skip/match check in tests/scripts/validate_resources.py must be
changed together, since ocp_resources/deployment.py alone is only one generated
output and will no longer be recognized if the strings diverge. Make the
validator’s generated-file detection match the new header exactly, and ensure
the generator emits the same updated header for all regenerated resources.

In `@ocp_resources/frr_configuration.py`:
- Line 1: The generated-file marker was changed, but the discovery logic still
looks for the old marker string, so generated resources with the new header are
missed. Update the marker consumer in class_generator/utils.py to match the new
class_generator/README.md header used by generated files, and verify the
resource discovery path still recognizes classes like the one in
frr_configuration.py.

In `@ocp_resources/group.py`:
- Line 1: The header check in validate_resources.py still hard-codes the old
generated-file marker, so the new class_generator README header is not being
recognized. Update the string matched by the validator to the new
class_generator/README.md header so generated resource files like the one in
group.py are skipped before AST validation.

In `@ocp_resources/lm_eval_job.py`:
- Line 1: The generated resource header is still using the old README path, so
update the header template in class_generator/core/generator.py so it emits the
new class_generator/README.md reference instead of the legacy
scripts/resource/README.md. Make the change in the generator logic that produces
the top-of-file comment for generated resources, then regenerate or update
affected outputs such as lm_eval_job.py so the header stays consistent across
future generated files.
- Line 1: The generated-file header string is out of sync between the resource
file and the generator/validator. Update the header emitted by
class_generator/core/generator.py to match the new class_generator/README.md
value, and change tests/scripts/validate_resources.py to recognize the same
header so regenerated resources pass validation. Keep the header constant
consistent across these symbols: generator.py, validate_resources.py, and the
generated lm_eval_job.py files.

In `@ocp_resources/mig_analytic.py`:
- Line 1: The generated resource marker still points to the old README path, so
update both the generator and validator to use class_generator/README.md
consistently. Change the path emitted by generator.py and the skipped marker
checked by validate_resources.py so generated files remain in sync and
validation recognizes the new location. Use the existing generator/validator
logic and the resource marker string to locate the updates.

In `@ocp_resources/network_config_openshift_io.py`:
- Line 1: The generated header in NetworkConfigOpenShiftIo now points to the
class_generator README, but tests/scripts/validate_resources.py still only skips
the old scripts/resource/README.md path. Update the skip logic in
validate_resources.py to exclude the new .../class_generator/README.md header so
the generated resources are not validated. Refer to the resource validation skip
list and any header-matching logic that checks generated files.

In `@ocp_resources/node_config_openshift_io.py`:
- Line 1: The generated-file marker logic in class_generator/utils.py still
looks for the old scripts/resource/README.md path, so update
_analyze_resource_file() to recognize the new class_generator/README.md marker
used by generated resource files. Adjust the match/check so files like
node_config_openshift_io.py are still detected as generated and included in
regeneration.

In `@ocp_resources/pod.py`:
- Line 1: The generated-file marker is inconsistent across the resource
generator and its consumers, so update the marker handling in
`class_generator/utils.py`, `class_generator/core/generator.py`, and
`tests/scripts/validate_resources.py` to match the new
`class_generator/README.md` reference used by `ocp_resources/pod.py`. Make the
generator emit the same marker string everywhere, and adjust the
validation/discovery logic so generated resources are still recognized
consistently after regeneration.

In `@ocp_resources/user_defined_network.py`:
- Line 1: The generated resource header and validation logic are still using the
old README URL, so update the hardcoded header reference in generator.py’s
generator flow and the header check in validate_resources.py to the new
class_generator README URL. Make sure the generation path that emits the comment
in user_defined_network.py and the validator both use the same source string so
future regenerations and checks stay in sync.

In `@ocp_resources/virtual_machine_instance_replica_set.py`:
- Line 1: The generated-file marker used by the scanner is still tied to the old
README reference, so new ocp_resources files with the class_generator header are
not being recognized. Update the marker logic in class_generator/utils.py around
the generated-file detection so it matches the new “Generated using
…/class_generator/README.md” header, and ensure the scanner continues to skip
generated files like virtual_machine_instance_replica_set.py.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d114a40-08ec-4055-9b1a-19f3c278dfa3

📥 Commits

Reviewing files that changed from the base of the PR and between fe6d2ed and 99bc065.

📒 Files selected for processing (132)
  • ocp_resources/aaq.py
  • ocp_resources/api_server.py
  • ocp_resources/authentication_config_openshift_io.py
  • ocp_resources/authentication_operator_openshift_io.py
  • ocp_resources/authorino.py
  • ocp_resources/bgp_session_state.py
  • ocp_resources/cdi.py
  • ocp_resources/cdi_config.py
  • ocp_resources/cluster_resource_quota.py
  • ocp_resources/cluster_user_defined_network.py
  • ocp_resources/config_imageregistry_operator_openshift_io.py
  • ocp_resources/config_map.py
  • ocp_resources/config_operator_openshift_io.py
  • ocp_resources/config_samples_operator_openshift_io.py
  • ocp_resources/console_config_openshift_io.py
  • ocp_resources/console_operator_openshift_io.py
  • ocp_resources/conversion.py
  • ocp_resources/csi_driver.py
  • ocp_resources/data_import_cron.py
  • ocp_resources/data_protection_application.py
  • ocp_resources/data_science_cluster.py
  • ocp_resources/data_science_pipelines_application.py
  • ocp_resources/deployment.py
  • ocp_resources/direct_volume_migration.py
  • ocp_resources/direct_volume_migration_progress.py
  • ocp_resources/dns_config_openshift_io.py
  • ocp_resources/dns_operator_openshift_io.py
  • ocp_resources/dsc_initialization.py
  • ocp_resources/evalhub.py
  • ocp_resources/frr_configuration.py
  • ocp_resources/gateway_class.py
  • ocp_resources/gateway_config.py
  • ocp_resources/gateway_gateway_networking_k8s_io.py
  • ocp_resources/gateway_networking_istio_io.py
  • ocp_resources/group.py
  • ocp_resources/guardrails_orchestrator.py
  • ocp_resources/image_caching_internal_knative_dev.py
  • ocp_resources/image_config_openshift_io.py
  • ocp_resources/image_content_source_policy.py
  • ocp_resources/image_image_openshift_io.py
  • ocp_resources/inference_graph.py
  • ocp_resources/ingress_config_openshift_io.py
  • ocp_resources/ingress_networking_k8s_io.py
  • ocp_resources/jaeger.py
  • ocp_resources/kube_descheduler.py
  • ocp_resources/kubelet_config.py
  • ocp_resources/kubevirt.py
  • ocp_resources/llama_stack_distribution.py
  • ocp_resources/llm_inference_service.py
  • ocp_resources/lm_eval_job.py
  • ocp_resources/maa_s_auth_policy.py
  • ocp_resources/maa_s_model.py
  • ocp_resources/maa_s_subscription.py
  • ocp_resources/maas_auth_policy.py
  • ocp_resources/maas_model_ref.py
  • ocp_resources/maas_subscription.py
  • ocp_resources/machine.py
  • ocp_resources/maria_db.py
  • ocp_resources/mariadb_operator.py
  • ocp_resources/mig_analytic.py
  • ocp_resources/mig_cluster.py
  • ocp_resources/mig_controller.py
  • ocp_resources/mig_migration.py
  • ocp_resources/mig_plan.py
  • ocp_resources/mlflow.py
  • ocp_resources/mlflow_config.py
  • ocp_resources/model_registry.py
  • ocp_resources/model_registry_components_platform_opendatahub_io.py
  • ocp_resources/model_registry_modelregistry_opendatahub_io.py
  • ocp_resources/mtq.py
  • ocp_resources/multi_namespace_virtual_machine_storage_migration.py
  • ocp_resources/multi_namespace_virtual_machine_storage_migration_plan.py
  • ocp_resources/namespace.py
  • ocp_resources/nemo_guardrails.py
  • ocp_resources/network_config_openshift_io.py
  • ocp_resources/network_operator_openshift_io.py
  • ocp_resources/network_policy.py
  • ocp_resources/nm_state.py
  • ocp_resources/node.py
  • ocp_resources/node_config_openshift_io.py
  • ocp_resources/node_network_configuration_policy_latest.py
  • ocp_resources/notebook.py
  • ocp_resources/oauth.py
  • ocp_resources/open_telemetry_collector.py
  • ocp_resources/operator.py
  • ocp_resources/pipeline.py
  • ocp_resources/pipeline_run.py
  • ocp_resources/pod.py
  • ocp_resources/pod_metrics.py
  • ocp_resources/project_config_openshift_io.py
  • ocp_resources/project_project_openshift_io.py
  • ocp_resources/project_request.py
  • ocp_resources/prometheus.py
  • ocp_resources/rate_limit_policy.py
  • ocp_resources/replica_set.py
  • ocp_resources/route_advertisements.py
  • ocp_resources/scaled_object.py
  • ocp_resources/scheduler.py
  • ocp_resources/securesign.py
  • ocp_resources/security_context_constraints.py
  • ocp_resources/self_subject_review.py
  • ocp_resources/service.py
  • ocp_resources/service_mesh_member.py
  • ocp_resources/service_serving_knative_dev.py
  • ocp_resources/serving_runtime.py
  • ocp_resources/snapshot.py
  • ocp_resources/ssp.py
  • ocp_resources/storage_cluster.py
  • ocp_resources/task.py
  • ocp_resources/task_run.py
  • ocp_resources/tempo_stack.py
  • ocp_resources/token_rate_limit_policy.py
  • ocp_resources/user.py
  • ocp_resources/user_defined_network.py
  • ocp_resources/validating_admission_policy.py
  • ocp_resources/validating_admission_policy_binding.py
  • ocp_resources/virtual_machine_cluster_instancetype.py
  • ocp_resources/virtual_machine_cluster_preference.py
  • ocp_resources/virtual_machine_export.py
  • ocp_resources/virtual_machine_instance.py
  • ocp_resources/virtual_machine_instance_migration.py
  • ocp_resources/virtual_machine_instance_preset.py
  • ocp_resources/virtual_machine_instance_replica_set.py
  • ocp_resources/virtual_machine_instancetype.py
  • ocp_resources/virtual_machine_preference.py
  • ocp_resources/virtual_machine_storage_migration.py
  • ocp_resources/virtual_machine_storage_migration_plan.py
  • ocp_resources/virtual_machine_template.py
  • ocp_resources/virtual_machine_template_request.py
  • ocp_resources/volume_snapshot.py
  • ocp_resources/volume_snapshot_class.py
  • ocp_resources/vtep.py

Comment thread ocp_resources/authorino.py
Comment thread ocp_resources/cluster_user_defined_network.py
Comment thread ocp_resources/deployment.py
Comment thread ocp_resources/frr_configuration.py
Comment thread ocp_resources/group.py
Comment thread ocp_resources/network_config_openshift_io.py
Comment thread ocp_resources/node_config_openshift_io.py
Comment thread ocp_resources/pod.py
Comment thread ocp_resources/user_defined_network.py
Comment thread ocp_resources/virtual_machine_instance_replica_set.py
@myakove

myakove commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

@qodo-code-review[bot]

The following review comments were reviewed and a decision was made:

ocp_resources/aaq.py:1 (qodo bug) — Generated scan marker mismatch

Addressed: Fixed in commit 21942b1 — updated scripts/resource/README.md to class_generator/README.md in all remaining places: class_generator/core/generator.py, class_generator/utils.py, tests/scripts/validate_resources.py, all test fixtures, and all test manifests. The marker is now consistent across the entire codebase. All tests pass (tox green).

@qodo-code-review

Copy link
Copy Markdown

code-review[bot]

The following review comments were reviewed and a decision was made:

ocp_resources/aaq.py:1 (qodo bug) — Generated scan marker mismatch

Addressed: Fixed in commit 21942b1 — updated scripts/resource/README.md to class_generator/README.md in all remaining places: class_generator/core/generator.py, class_generator/utils.py, tests/scripts/validate_resources.py, all test fixtures, and all test manifests. The marker is now consistent across the entire codebase. All tests pass (tox green).

Thanks — that matches the current PR state.

  • finding 1 is already marked implemented.
  • The scan marker is now consistent across the generator, validation script, tests, and fixtures.

No further action needed from my side.

myakove added 2 commits June 29, 2026 12:50
Update the generated code comment marker in all 132 ocp_resources files
from scripts/resource/README.md to class_generator/README.md to align
with the current class-generator tool location and .coderabbit.yaml
skip instructions.
Update scripts/resource/README.md → class_generator/README.md in all
remaining places: generator output, resource scanner, validator, test
fixtures, and test manifests. This ensures the marker is consistent
across the entire codebase and the class-generator toolchain.
@myakove myakove force-pushed the chore/update-generated-code-marker branch from 21942b1 to c1ced2f Compare June 29, 2026 09:50
@redhat-qe-bot1

Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (21942b1).
The following labels were preserved: commented-myakove, commented-coderabbitai[bot].

@myakove

myakove commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator Author

/verified

@rnetser

rnetser commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

/approve
/lgtm

@rnetser rnetser merged commit de8b142 into main Jun 29, 2026
9 checks passed
@rnetser rnetser deleted the chore/update-generated-code-marker branch June 29, 2026 10:27
dalia-frank added a commit to dalia-frank/openshift-python-wrapper that referenced this pull request Jul 1, 2026
…path

Update generated code marker from scripts/resource/README.md to
class_generator/README.md to align with PR RedHatQE#2750.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants